<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>系统角色授权</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/static/lib/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/lib/layuiadmin/style/admin.css" media="all">
</head>
<body>

<div class="layui-fluid" id="LAY-component-grid-mobile">

    <div class="layui-row layui-col-space10">
        <div class="layui-col-xs5" style="height: 100%">
            <div class="layui-card" >
                <div class="layui-card-header">【流程角色】</div>
                <div class="layui-card-body" style="height: 700px; overflow:auto">
                    <form class="layui-form" id="orgForm" lay-filter="orgForm">
                        <div class="layui-form-item" style="border: 0px solid green">
                            <div class="layui-input-inline" style="border: 0px solid red;width:71%;">
                                <select name="modules" lay-filter="orgSelect" lay-verify="required" lay-search="" style="width: 300px;">
                                    <option value="">请选择机构</option>

                                </select>
                            </div>
                            <div class="layui-input-inline" style="border: 0px solid blue;width: 24%; padding: 0px 0px 0px 0px">
                                &nbsp;&nbsp;<a id="btnOk" class="layui-btn layui-btn" onclick="addRole(0);" lay-submit=""> <i class="layui-icon">&#xe654;</i>添加角色</a>
                            </div>
                        </div>
                    </form>

                    <table id="wfRole" lay-filter="wfRole"></table>

                </div>
            </div>
        </div>

        <div class="layui-col-xs3" style="height: 100%">
            <div class="layui-card" >
                <div class="layui-card-header roleNameText"></div>
                <div class="layui-card-body" style="overflow:auto;height: 700px;">
                    <form class="layui-form">
                        <div class="layui-form-item" style="border: 0px solid blue;">
                            <div style="padding-top: 10px">选择人员 <span id="msgSelectRole" style="color: red;display: none;"> - 请先选择角色</span> </div>
                            <div style="border: 0px solid red;margin: 20px 0px 0px 20px;">
                                <div id="ouTree"></div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <div class="layui-col-xs4" style="height: 100%">
            <div class="layui-card">
                <div class="layui-card-header funcText"></div>
                <div class="layui-card-body" style="overflow:auto;height: 700px;">
                    <div style="padding-top: 10px">已选人员</div>
                    <div style="margin-top: 20px">
                        <table id="wfRoleUser" lay-filter="wfRoleUser"></table>
                    </div>
                    <div style="float: right;padding: 20px 80px 0px 0px">
                        <a id="btnClear" class="layui-btn layui-btn" onclick="clearRoleUser();"> <i class="layui-icon">&#x1006;</i>清空</a>&nbsp;&nbsp;
                        <a id="btnReset" class="layui-btn layui-btn" onclick="cancelRoleUser();"> <i class="layui-icon">&#xe669;</i>还原</a>&nbsp;&nbsp;
                        <a id="btnSave" class="layui-btn layui-btn" onclick="saveRoleUser();"> <i class="layui-icon">&#xe605;</i>保存</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--add role-->
<div id="divAddRole" style="display: none">
    <form id="formRoleInfo" class="layui-form" style="margin: 30px 60px 0px 0px">
        <div class="layui-form-item">
            <label class="layui-form-label">机构名称</label>
            <div class="layui-input-block">
                <input type="text" id="orgId" name="orgId" autocomplete="off" class="layui-input" readonly="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span style="color: red;">*</span>角色标识</label>
            <div class="layui-input-block">
                <input type="text" id="enName" name="enName" autocomplete="off" class="layui-input" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span style="color: red;">*</span>角色名称</label>
            <div class="layui-input-block">
                <input type="text" id="cnName" name="cnName" autocomplete="off" class="layui-input" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色描述</label>
            <div class="layui-input-block">
                <input type="text" id="description" name="description" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div style="text-align: right;margin: 20px 90px 0px 0px">
            <a id="btnSaveRole" class="layui-btn layui-btn" onclick="saveRole();" lay-submit>
                <i class="layui-icon">&#xe605;</i>保存
            </a>
            <a id="btnCancel" class="layui-btn layui-btn" onclick="closeLayer();">
                <i class="layui-icon">&#x1006;</i>取消
            </a>
        </div>

    </form>


</div>


<script type="text/html" id="toolRole">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script type="text/html" id="toolRoleUser">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="moveout">移除</a>
</script>
<script type="text/javascript" src="/common/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/static/lib/layuiadmin/layui/layui.js"></script>
<script type="text/javascript" src="/common/common.js"></script>
<script type="text/javascript" src="/common/jquery.serializejson.min.js"></script>
<script type="text/javascript" src="wfRole.js"></script>
</body>
</html>